import { VxeGridProps } from 'vxe-table';
import { BizContractVo } from '@/api/operation/contract/types';

export function getTableConfig(): VxeGridProps<BizContractVo> {
  return {
    id: 'tenant',
    loading: false,
    height: 'auto',
    autoResize: true,
    border: 'inner',
    resizable: true,
    showOverflow: 'tooltip',
    stripe: true,
    rowConfig: {
      isHover: true,
      keyField: 'id'
      // height: 56
    },
    customConfig: {
      storage: true
    },
    columns: [
      { title: '序号', type: 'seq', width: 50 },
      { sortable: true, field: 'contractNo', title: '合同编号', minWidth: 90 },
      { sortable: true, field: 'vendorName', title: '酒店名称', minWidth: 100 },
      { sortable: true, field: 'regionName', minWidth: 150, title: '区域' },
      { sortable: true, field: 'signUser', minWidth: 80, title: '负责人' },
      { sortable: true, field: 'vendorUser', minWidth: 80, title: '联系人' },
      { sortable: true, field: 'vendorPhone', minWidth: 100, title: '联系电话' },
      { sortable: true, field: 'signTime', minWidth: 80, title: '签订日期' },
      { sortable: true, field: 'validFrom', minWidth: 90, title: '生效日期' },
      { sortable: true, field: 'validTo', minWidth: 130, title: '结束日期' },
      { sortable: true, field: 'status', minWidth: 130, title: '状态', slots: { default: 'status' } },
      { sortable: true, field: 'handle', fixed: 'right', title: '操作', width: '140px', slots: { default: 'handle' } }
    ],
    data: [] as BizContractVo[]
  };
}
